import { ColumnProps } from '~/library/components/ProTable/interface'
import { User } from '~/src/api/interface/user'
import { accountStatus, accountType, genderType } from '~/src/utils/serviceDict'

export const userMaNgerColumns: ColumnProps<User.UserManger>[] = [
  { type: 'index', label: '序号', width: 60 },
  { sortable: true, prop: 'userName', minWidth: 120, label: '账号', align: 'left' },
  { sortable: true, prop: 'nickName', label: '昵称', minWidth: 120, align: 'left', search: { el: 'input' } },
  {
    sortable: true,
    prop: 'sex',
    label: '性别',
    minWidth: 100,
    enum: genderType,
    search: { el: 'select' },
  },
  { sortable: true, prop: 'userType', label: '账户类型', minWidth: 120, enum: accountType, align: 'left' },
  { sortable: true, prop: 'state', label: '状态', minWidth: 100, enum: accountStatus, align: 'left' },
  { sortable: true, prop: 'defaultPassWord', label: '默认密码', minWidth: 100, align: 'left' },
  { prop: 'operation', label: '操作', fixed: 'right', width: 128 },
]
